﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="PagesManage.aspx.cs" Inherits="Manage_PagesManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/FckEditor/fckeditor.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/swfupload.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/SwfUploadHelper.js"></script> 
<script type="text/javascript" src="/Manage/Js/PagesManage.js"></script>
 <script type="text/javascript" src="/JsBase/json.js"></script>
<script type="text/javascript">
    ModelOfPage = <%=JSONHelper.ObjectToJson<PageInfo>(new PageInfo()) %>;
    ModelOfParam = <%= new PageParams().ToJsonString() %>;
    ModelOfContent = <%= new PageContents().ToJsonString() %>;
      SessionID = '<%=Session.SessionID %>';
</script>


<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr >
    <td colspan="7" align="left" class="HeadTitle">&gt;&gt;静态页面管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="left">页面名称</td>
    <td width="70" align="center">排序值</td>
    <td width="80" align="center">状态</td>
    <td width="130" align="center">上次修改日期</td>
    <td width="130" align="center">创建日期</td>
    <td width="220" align="center">管理 [<a href="javascript:Add();" class="red">添加页面</a>] </td>
  </tr>
  <%
      if (listOfData != null)
      {
          Dictionary<string, string> dictColor = new Dictionary<string, string>();
          dictColor.Add(Status.正用.ToString(), "green");
          dictColor.Add(Status.停用.ToString(), "red");
          for (int i = 0; i < listOfData.Count; ++i)
          {
              Pages p = listOfData[i];
  %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=i+1 %>.</td>
    <td align="left"><a href="javascript:EditContent(<%=p.PageID %>);" ><%=p.PageName %> (ID=<%=p.PageID %>)</a> [<a href="/<%=p.ViewUrl %>" target="_blank" class="green bold">访问页面</a>] </td>
    <td align="center"><%=p.OrderValue %></td>
    <td align="center" class="<%=dictColor[p.Status] %>"><%=p.Status %></td>
    <td align="center"><%=p.LastModifyDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><%=p.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")%></td>
    <td align="center">[ <a href="javascript:EditContent(<%=p.PageID %>);" class="green bold">编辑页面内容</a> ] [ <a href="javascript:Edit(<%=p.PageID %>);">编辑</a> ] </td>
  </tr>
   <%}
      }
       else
      { %>
  <tr>
    <td colspan="7" align="center" class="red">[ 未找到任何静态页面信息！]</td>
  </tr>
  <%} %>
</table>

</asp:Content>

